<%inherit file="/base.html"/>

<%def name="main_heading()">${c.document}</%def>

<%def name="content()">
	<table class="properties-table">
		<tr><th colspan="2">${_('General information')}</th></tr>
		<tr>
			<th class="property">${_('Type')}:</th>
			<td>
				% if c.document.type_id > 0:
					${c.document.type.name}
				% else:
					${_('other')}
				% endif
				% if c.document.institution_id > 0:
					${c.document.institution.short_name}
				% endif
			</td>
		</tr>
		<tr>
			<th class="property">${_('Number')}:</th>
			<td>${c.document.number}</td>
		</tr>
		<tr>
			<th class="property">${_('Approved')}:</th>
			<td>${c.document.approved}</td>
		</tr>
		<tr>
			<th class="property">${_('Title')}:</th>
			<td>${c.document.title}</td>
		</tr>
		<tr>
			<th class="property">${_('Sections')}:</th>
			<td>
				% for section in c.document.sections:
					<a href="${url(controller='docs', action='section', id=section.id)}">${section}</a>
				% endfor
			</td>
		</tr>
		<tr>
			<th class="property">${_('Tags')}:</th>
			<td>
				${', '.join([h.tag_link(tag) for tag in c.document.tags])|n}
			</td>
		</tr>
		<tr>
			<th class="property">${_('Files')}:</th>
			<td>
				${', '.join([h.file_link(file) for file in c.document.files])|n}
			</td>
		</tr>
		<tr><th colspan="2">${_('Technical details')}</th></tr>
		<tr>
			<th class="property">${_('Author')}:</th>
			<td>
				<a href="${url(controller='docs', action='user', id=c.document.author_id)}">${c.document.author}</a>
				${h.user_online(c.document.author)}
			</td>
		</tr>
		<tr>
			<th class="property">${_('Created')}:</th>
			<td>${c.document.created}</td>
		</tr>
		<tr>
			<th class="property">${_('Modified')}:</th>
			<td>${c.document.modified}</td>
		</tr>
	</table>
	<a href="${request.referer}">&lt;&lt; ${_('back')}</a>
</%def>